export const getUrlParams = () => {
    let fullUrl = window.location.href;
    let theRequest = {};
    if (fullUrl.indexOf("?") !== -1) {
        var temp = fullUrl.split("?");
        let str = temp[1];
        let strs = str.split("&");
        for (var i = 0; i < strs.length; i++) {
            theRequest[strs[i].split("=")[0]] = strs[i].split("=")[1];
        }
    }
    return theRequest;
}

export const getUrlParameter = (parameter) => {
    return getUrlParams()[parameter];
}